#给定一个二进制数组 nums ， 计算其中最大连续 1 的个数。
class Solution:
    def findMaxConsecutiveOnes(self, nums: List[int]) -> int:
        maxcount = count = 0
        n =len(nums)
        for i in range (0, n):
            if nums[i] == 1:
                count += 1
            else:
                maxcount = max(maxcount, count)
                count = 0
        maxcount = max(maxcount, count)
        return maxcount